package com.hnrd.crud.controller;

import java.util.List;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hnrd.crud.annotation.Permissions;
import com.hnrd.crud.mapper.PermissionMapper;

@RequestMapping("user")
@RestController
public class UserController {
	@Autowired
	private PermissionMapper permissionMapper;
	@RequestMapping("addUserRoles")
	public ResponseEntity<Map<String,Object>> addUserRoles(Integer[] roleIds){//为用户添加角色
		return null;
	}
	@Permissions(permission="普通用户权限")
	@RequestMapping("selectPermissonsByUserName")
	public List<String> selectPermissonsByUserName(String username){
		return permissionMapper.selectPermissonsByUserName(username);
			
	}
}
